package com.xbts.system.mapper;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.xbts.system.domain.CnVirtuallyUserBuyLog;
import com.xbts.system.domain.vo.CnWorkOrderDetailVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 用户购买记录（虚拟）Mapper接口
 * 
 * @author xbts
 * @date 2023-11-30
 */
@Mapper
public interface CnVirtuallyUserBuyLogMapper extends BaseMapper<CnVirtuallyUserBuyLog> {

    @Select("select ubl.id, ubl.user_id, uha.nick_name,ubl.product_type_name,ubl.product_name," +
            "ubl.amount,ubl.remark,ubl.create_time,ubl.product_count,ubl.product_config,ubl.service_type_name \n" +
            "from cn_virtually_user_buy_log ubl \n" +
            "left join cn_virtually_user_hw_account uha on uha.user_id = ubl.user_id ${ew.customSqlSegment} ")
    List<CnVirtuallyUserBuyLog> selectCnVirtuallyUserBuyLogList(@Param(Constants.WRAPPER) QueryWrapper<CnVirtuallyUserBuyLog> queryWrapper);
}
